package nju.mscs.data.object;

import java.io.Serializable;

public class SaleGoods implements Serializable{
	public static int SALE = 0;
	public static int UNSALE = 1;
	private int type;
	private Goods goods;
	private int sum;
	private double discount;
	SaleGoods(Goods goods,int sum,double discount){
		this.goods = goods;
		this.sum = sum;
		this.discount = discount;
	}
	public Goods getGoods() {
		return goods;
	}
	public void setGoods(Goods goods) {
		this.goods = goods;
	}
	public double getDiscount() {
		return discount;
	}
	public void setDiscount(double discount) {
		this.discount = discount;
	}
	public int getSum() {
		return sum;
	}
	public void setSum(int sum) {
		this.sum = sum;
	}
	public String toString(){
		return this.getGoods().getName()+'\t'+this.getSum()+'\t'+this.getDiscount();
	}
}